<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel backend\models\BannerSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '下级用户列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="banner-index col-sm-12" style="margin-top: 15px;">

    <div class="ibox ibox-content float-e-margins">

        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'tableOptions' => ['class' => 'table table-striped'],
//            'options' => ['class' => 'grid-view', 'style' => 'overflow:auto', 'id' => 'grid'],
//            'filterModel' => $searchModel,
            'columns' => [
//                [
//                    'class' => \yii\grid\CheckboxColumn::className(),
//                    'name' => 'id',  //设置每行数据的复选框属性
//                ],
                'id',
                "username",
                "nickname",
                "sex",
                [
                    'headerOptions' => ['width'=>'200px'],
                    'attribute' => 'avatar',
                    'class' => kn\images\ViewImages::class,
                ],
                "code",
                [
                    'attribute' => 'updated_at',
                    'value' => function ($m) {
                        return date('Y-m-d H:i:s', $m->updated_at);
                    }
                ]
            ],
        ]); ?>
    </div>
</div>